package top.yuyufeng.sample.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;

/**
 * @author yuyufeng
 * @date 2018/4/19.
 */
@RestController
public class HelloController {

    @Resource(name="redisTemplate")
    private ValueOperations<String, String> valueOs;


    @RequestMapping(value = "/hello")
    String hello(String name){
        return "hello" + name;
    }

    @RequestMapping(value = "/info")
    String error(){
        return "请先登录";
    }
}
